<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var arr = (temp, box) => {
      if (temp.length === 0) return true
      for (let i = 0; i < temp.length; i++) {
        var oldBox = temp[i]
        for (let j = 0; j < 3; j++) {
          if (oldBox[j] <= box[j] && oldBox !== 0) {
            return false
          }
        }

      }
      return true
    }
    console.log([[1, 1, 1], [2, 2, 2], [3, 3, 3]]);
  </script>
</body>

</html>